home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / health / module1.bas < prev    next >
BASIC Source File  |  1993-07-22  |  39KB  |  1,692 lines

  1.  
  2. Sub bounce (picsrc As Form, picdest As Control)
  3. picsrc.ScaleMode = PIXEL
  4. picdest.ScaleMode = PIXEL
  5. hDestDC% = picdest.hDC
  6. X% = 0: Y% = 0
  7. nWidth% = picdest.ScaleWidth
  8. nHeight% = picdest.ScaleHeight
  9. hSrcDC% = picsrc.hDC
  10. xsrc% = 0: ysrc% = summary.HEdit1.Top
  11. dwRop& = &HCC0020
  12. SUC% = BitBlt(hDestDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, xsrc%, ysrc%, dwRop&)
  13. picsrc.ScaleMode = TWIPS
  14. picdest.ScaleMode = TWIPS
  15.  
  16. End Sub
  17.  
  18. Sub bounce2 (picsrc As Control, picdest As Control)
  19. picsrc.ScaleMode = PIXEL
  20. picdest.ScaleMode = PIXEL
  21. hDestDC% = picdest.hDC
  22. X% = 0: Y% = 0
  23. nWidth% = picdest.ScaleWidth
  24. nHeight% = picdest.ScaleHeight
  25. hSrcDC% = picsrc.hDC
  26. xsrc% = 0: ysrc% = 0
  27. dwRop& = &HCC0020
  28. SUC% = BitBlt(hDestDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, xsrc%, ysrc%, dwRop&)
  29. picsrc.ScaleMode = TWIPS
  30. picdest.ScaleMode = TWIPS
  31.  
  32. End Sub
  33.  
  34. Sub clearoutine ()
  35. screen.MousePointer = 11
  36. LSet temprecord = clearrecord
  37.     
  38.    
  39.     For n = 0 To 2
  40.     assess1.Option3D1(n).ForeColor = &HFF0000
  41.     Next n
  42.     For n = 0 To 5
  43.     assess1.Option3D4(n).ForeColor = &HFF0000
  44.     Next n
  45.     For n = 0 To 4
  46.     assess1.Option3D10(n).ForeColor = &HFF0000
  47.     Next n
  48.     assess1.Label5.ForeColor = &HFF0000
  49.  
  50. assess1.BEdit2.Text = ""
  51. assess1.HEdit2.Text = ""
  52.  
  53. idform.BEdit1.Text = ""
  54. idform.HEdit1.Text = ""
  55.     idform.BEdit1.Visible = -1
  56.     idform.BEdit1.Text = "   -  -    "
  57.     idform.HEdit1.Visible = 0
  58.     idform.HEdit1.Enabled = -1
  59.     idform.AniButton4.Value = 1
  60.     idform.AniButton3(2).Value = 1
  61.     idform.Option3D1(0).Value = 0
  62.     idform.Option3D1(1).Value = 0
  63.     idform.Check3D1.Value = 0
  64.  
  65. picloc = 0
  66.  
  67. assess1.Option3D1(0).Value = 0
  68. assess1.Option3D1(1).Value = 0
  69. assess1.Option3D1(2).Value = 0
  70. assess1.Option3D4(0).Value = 0
  71. assess1.Option3D4(1).Value = 0
  72. assess1.Option3D4(2).Value = 0
  73. assess1.Option3D4(3).Value = 0
  74. assess1.Option3D4(4).Value = 0
  75. assess1.Option3D4(5).Value = 0
  76. assess1.Option3D10(0).Value = 0
  77. assess1.Option3D10(1).Value = 0
  78. assess1.Option3D10(2).Value = 0
  79. assess1.Option3D10(3).Value = 0
  80. assess1.Option3D10(4).Value = 0
  81. assess1.Check3D3(0).Value = 0
  82. assess1.Check3D3(1).Value = 0
  83. assess1.Check3D3(2).Value = 0
  84. assess1.Check3D3(3).Value = 0
  85. assess1.Check3D3(4).Value = 0
  86. assess1.Check3D3(5).Value = 0
  87. assess1.Check3D3(6).Value = 0
  88. assess1.Check3D3(7).Value = 0
  89. assess1.Check3D3(8).Value = 0
  90. assess1.Check3D1.Value = 0
  91. assess1.Check3D2.Value = 0
  92. assess2.BEdit1(0).Text = ""
  93. assess2.BEdit1(1).Text = ""
  94. assess2.BEdit2(0).Text = ""
  95. assess2.BEdit2(1).Text = ""
  96. assess2.hedit1(0).Text = ""
  97. assess2.hedit1(1).Text = ""
  98. assess2.hedit2(0).Text = ""
  99. assess2.hedit2(1).Text = ""
  100. assess2.HEdit3.Text = ""
  101. medhist.Check3D1(0).Value = 0
  102. medhist.Check3D1(1).Value = 0
  103. medhist.Check3D1(2).Value = 0
  104. medhist.Check3D1(3).Value = 0
  105. medhist.Check3D1(4).Value = 0
  106. medhist.Check3D1(5).Value = 0
  107. medhist.Check3D1(6).Value = 0
  108. medhist.Check3D1(7).Value = 0
  109. medhist.Check3D2(0).Value = 0
  110. medhist.Check3D2(1).Value = 0
  111. medhist.Check3D2(2).Value = 0
  112. medhist.Check3D2(3).Value = 0
  113. medhist.Check3D2(4).Value = 0
  114. medhist.Check3D2(5).Value = 0
  115. medhist.Check3D2(6).Value = 0
  116. medhist.Check3D2(7).Value = 0
  117. medhist.Check3D3(0).Value = 0
  118. medhist.Check3D3(1).Value = 0
  119. medhist.Check3D3(2).Value = 0
  120. medhist.Check3D3(3).Value = 0
  121. medhist.Check3D3(4).Value = 0
  122. medhist.Check3D3(5).Value = 0
  123. medhist.Check3D3(6).Value = 0
  124. medhist.Check3D3(7).Value = 0
  125. medhist.Check3D4(0).Value = 0
  126. medhist.Check3D4(1).Value = 0
  127. medhist.Check3D4(2).Value = 0
  128. medhist.Check3D4(3).Value = 0
  129. medhist.Check3D4(4).Value = 0
  130. medhist.Check3D4(5).Value = 0
  131. medhist.Check3D4(6).Value = 0
  132. medhist.Check3D4(7).Value = 0
  133. Do While MDIChild1A.List1(1).ListCount
  134.     MDIChild1A.List1(1).RemoveItem 0
  135.     Loop
  136.  
  137. Do While MDIChild1B.List2(1).ListCount
  138.     MDIChild1B.List2(1).RemoveItem 0
  139.     Loop
  140.  
  141. Do While MDIChild1C.List3(1).ListCount
  142.     MDIChild1C.List3(1).RemoveItem 0
  143.     Loop
  144.  
  145. Do While summary.List2.ListCount
  146.     summary.List2.RemoveItem 0
  147.     Loop
  148. screen.MousePointer = 0
  149. End Sub
  150.  
  151. Sub dispose ()
  152. exitsave.Show 1
  153. If admit.Picture1.Tag = "new" Then
  154.     admit.Picture1.Cls
  155.     admit.Picture1.AutoRedraw = -1
  156.     admit.Picture1.Scale (0, 0)-(3, 4)
  157.     admit.Picture1.CurrentX = .8
  158.     admit.Picture1.CurrentY = 1.2
  159.     admit.Picture1.Print "CLICK"
  160.     admit.Picture1.CurrentX = 1
  161.     admit.Picture1.CurrentY = 2
  162.     admit.Picture1.Print " TO"
  163.     admit.Picture1.CurrentX = .8
  164.     admit.Picture1.CurrentY = 2.8
  165.     admit.Picture1.Print "BEGIN"
  166.     clearoutine
  167.     admit.Show
  168. End If
  169. End Sub
  170.  
  171. Sub editswap (thebedit As Control, thehedit As Control, process As Integer)
  172. Select Case process
  173. Case 1
  174.     For n = 1 To Len(thebedit.Text)
  175.     a$ = a$ + Mid$(thebedit.Text, n, 1) + Chr$(32)
  176.     Next n
  177.     thehedit.Text = Chr$(32) + a$
  178.  
  179. Case 2
  180.     For n = 1 To Len(thehedit.Text)
  181.     If Mid$(thehedit.Text, n, 1) <> " " Then
  182.         a$ = a$ + Mid$(thehedit.Text, n, 1)
  183.     End If
  184.     Next n
  185.     thebedit.Text = a$
  186. End Select
  187.  
  188.  
  189. End Sub
  190.  
  191. Sub Endroutine ()
  192. Unload admit
  193. Unload assess1
  194. Unload assess2
  195. Unload assess3
  196. Unload idform
  197. Unload medhist
  198. Unload MDIMForm
  199. Unload summary
  200. End    'redundant but...
  201. End Sub
  202.  
  203. Sub fillfields ()
  204. nofocuscalls = -1
  205. assess1.BEdit1.Text = patrecord.dayt
  206. assess1.BEdit2.Text = patrecord.tyme
  207. assess1.Option3D1(0).Value = patrecord.theoption.opt1
  208. assess1.Option3D1(1).Value = patrecord.theoption.opt2
  209. assess1.Option3D1(2).Value = patrecord.theoption.opt3
  210. assess1.Option3D4(0).Value = patrecord.theoption.opt4
  211. assess1.Option3D4(1).Value = patrecord.theoption.opt5
  212. assess1.Option3D4(2).Value = patrecord.theoption.opt6
  213. assess1.Option3D4(3).Value = patrecord.theoption.opt7
  214. assess1.Option3D4(4).Value = patrecord.theoption.opt8
  215. assess1.Option3D4(5).Value = patrecord.theoption.opt9
  216. assess1.Option3D10(0).Value = patrecord.theoption.opt10
  217. assess1.Option3D10(1).Value = patrecord.theoption.opt11
  218. assess1.Option3D10(2).Value = patrecord.theoption.opt11
  219. assess1.Option3D10(3).Value = patrecord.theoption.opt13
  220. assess1.Option3D10(4).Value = patrecord.theoption.opt14
  221. assess1.Check3D3(0).Value = patrecord.chicks.chek1
  222. assess1.Check3D3(1).Value = patrecord.chicks.chek2
  223. assess1.Check3D3(2).Value = patrecord.chicks.chek3
  224. assess1.Check3D3(3).Value = patrecord.chicks.chek4
  225. assess1.Check3D3(4).Value = patrecord.chicks.chek5
  226. assess1.Check3D3(5).Value = patrecord.chicks.chek6
  227. assess1.Check3D3(6).Value = patrecord.chicks.chek7
  228. assess1.Check3D3(7).Value = patrecord.chicks.chek8
  229. assess1.Check3D3(8).Value = patrecord.chicks.chek9
  230. assess1.Check3D1.Value = patrecord.chk1
  231. assess1.Check3D2.Value = patrecord.chk2
  232. assess2.BEdit1(0).Text = patrecord.name
  233. assess2.BEdit1(1).Text = patrecord.relation
  234. assess2.BEdit2(0).Text = patrecord.home
  235. assess2.BEdit2(1).Text = patrecord.work
  236. assess2.hedit1(0).Text = patrecord.name
  237. assess2.hedit1(1).Text = patrecord.relation
  238. assess2.hedit2(0).Text = patrecord.home
  239. assess2.hedit2(1).Text = patrecord.work
  240. assess2.HEdit3.Text = patrecord.hed1
  241. medhist.Check3D1(0).Value = patrecord.d1.shek1
  242. medhist.Check3D1(1).Value = patrecord.d1.shek2
  243. medhist.Check3D1(2).Value = patrecord.d1.shek3
  244. medhist.Check3D1(3).Value = patrecord.d1.shek4
  245. medhist.Check3D1(4).Value = patrecord.d1.shek5
  246. medhist.Check3D1(5).Value = patrecord.d1.shek6
  247. medhist.Check3D1(6).Value = patrecord.d1.shek7
  248. medhist.Check3D1(7).Value = patrecord.d1.shek8
  249. medhist.Check3D2(0).Value = patrecord.d2.shek1
  250. medhist.Check3D2(1).Value = patrecord.d2.shek2
  251. medhist.Check3D2(2).Value = patrecord.d2.shek3
  252. medhist.Check3D2(3).Value = patrecord.d2.shek4
  253. medhist.Check3D2(4).Value = patrecord.d2.shek5
  254. medhist.Check3D2(5).Value = patrecord.d2.shek6
  255. medhist.Check3D2(6).Value = patrecord.d2.shek7
  256. medhist.Check3D2(7).Value = patrecord.d2.shek8
  257. medhist.Check3D3(0).Value = patrecord.d3.shek1
  258. medhist.Check3D3(1).Value = patrecord.d3.shek2
  259. medhist.Check3D3(2).Value = patrecord.d3.shek3
  260. medhist.Check3D3(3).Value = patrecord.d3.shek4
  261. medhist.Check3D3(4).Value = patrecord.d3.shek5
  262. medhist.Check3D3(5).Value = patrecord.d3.shek6
  263. medhist.Check3D3(6).Value = patrecord.d3.shek7
  264. medhist.Check3D3(7).Value = patrecord.d3.shek8
  265. medhist.Check3D4(0).Value = patre